package com.prs.crm.domain.doc;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.hr.Dept;

@Entity
@Table(name = "doc_DocumentTaskType")
/*
 * 任务文档类型
 */
public class DocumentTaskType extends BaseEntity {

	private static final long serialVersionUID = -8148256415530888431L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;

	private String name;

	@ManyToOne
	private DocumentTaskType parent;
	@OneToMany(mappedBy = "parent")
	private Set<DocumentTaskType> childs;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public DocumentTaskType getParent() {
		return parent;
	}

	public void setParent(DocumentTaskType parent) {
		this.parent = parent;
	}

	public Set<DocumentTaskType> getChilds() {
		return childs;
	}

	public void setChilds(Set<DocumentTaskType> childs) {
		this.childs = childs;
	}

}
